package com.luoye.lj.platform.constant;


import com.luoye.lj.platform.model.exception.ExceptionEntity;
import com.luoye.lj.platform.model.exception.ServiceException;

/**
 * Created with IntelliJ IDEA.
 * User: Dave Liu
 * Date: 15-10-28
 * Time: 下午3:50
 * To change this template use File | Settings | File Templates.
 */
public interface ServiceExceptionConstants {
    ServiceException SAVE_FAILED=new ServiceException(new ExceptionEntity(40001,"保存数据到数据库失败，请重试"), 500);

    ServiceException USER_ALREADY_EXIST=new ServiceException(new ExceptionEntity(40101,"用户已经存在，不要重复添加"), 500);
    ServiceException USER_NOT_FOUND=new ServiceException(new ExceptionEntity(40102,"用户不存在"), 500);

    ServiceException ROLE_ALREADY_EXIST=new ServiceException(new ExceptionEntity(40201,"角色已经存在"), 500);
    ServiceException ROLE_ALREADY_ANAMEEXIST=new ServiceException(new ExceptionEntity(40207,"角色名重复！"), 500);
    ServiceException ROLE_NOT_DESCRIPTION=new ServiceException(new ExceptionEntity(40202,"请填写描述"),500);
    ServiceException ROLE_NOT_NULLID=new ServiceException(new ExceptionEntity(40204,"传入的ID有误"),500);
    ServiceException ROLE_NOT_NULLRNAME=new ServiceException(new ExceptionEntity(40203,"请填写角色名"),500);
    ServiceException ROLE_NOT_NULLRRA=new ServiceException(new ExceptionEntity(40205,"请至少关联一项权限"),500);
    ServiceException ROLE_NOT_NOTFOUND=new ServiceException(new ExceptionEntity(40206,"角色不存在"),500);
    ServiceException ROLE_NOT_NULLRTYPE=new ServiceException(new ExceptionEntity(40207,"请填写角色类型"),500);

    ServiceException AUTH_ALREADY_EXIST=new ServiceException(new ExceptionEntity(40301,"该权限已存在，不要重复添加"), 500);
    ServiceException AUTH_ALREADY_REPEAT=new ServiceException(new ExceptionEntity(40301,"该权限名已存在，不要重复添加"), 500);
    ServiceException AUTH_ALREADY_DESCRIPTION=new ServiceException(new ExceptionEntity(40302,"请填写描述"), 500);
    ServiceException AUTH_ALREADY_AUTHNAME=new ServiceException(new ExceptionEntity(40303,"请填写名称"), 500);
    ServiceException AUTH_ALREADY_NULLID=new ServiceException(new ExceptionEntity(40304,"没有传入ID"), 500);
    ServiceException AUTH_ALREADY_NULL=new ServiceException(new ExceptionEntity(40305,"该权限不存在"), 500);

}
